/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.component;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import com.qihoo.gamecenter.sdk.pay.res.b;

public class CustomCheckBox extends TextView {
    private boolean a;
    private b b;
    private View.OnClickListener c;

    public CustomCheckBox(Context paramContext) {
        this(paramContext, null);
    }

    public CustomCheckBox(Context paramContext, AttributeSet paramAttributeSet) {
        super(paramContext, paramAttributeSet);
        this.a = false;
        this.c = new View.OnClickListener() {
            public void onClick(View paramView) {
                CustomCheckBox.this.setChecked(!(CustomCheckBox.a(CustomCheckBox.this)), false);
            }
        };
        this.b = b.a(paramContext);
        setClickable(true);
        setGravity(16);
    }

    public void setChecked(boolean paramBoolean1, boolean paramBoolean2) {
        this.a = paramBoolean1;
        if (this.a)
            this.b.a(this, 1073741864, 0, 0, 0);
        else
            this.b.a(this, 1073741865, 0, 0, 0);
        if (!(paramBoolean2))
            return;
        super.setOnClickListener(this.c);
    }

    public boolean a() {
        return this.a;
    }

    public void setOnClickListener(View.OnClickListener paramOnClickListener) {
        super.setOnClickListener(new View.OnClickListener(paramOnClickListener) {
            public void onClick(View paramView) {
                CustomCheckBox.b(CustomCheckBox.this).onClick(paramView);
                if (this.a == null)
                    return;
                this.a.onClick(paramView);
            }
        });
    }
}